package com.spring.demo1.repeatable;

import java.lang.annotation.Annotation;
import java.lang.reflect.Field;

/**
 * @author vhans
 */
@Ann1(name = "Vhans")
@Ann1(name = "luowei")
public class Test {

    @Ann1s({@Ann1(name = "1"), @Ann1(name = "2")})
    private String v1;

    @org.junit.Test
    public void test() throws NoSuchFieldException {
        for (Annotation annotation : Test.class.getAnnotations()) {
            System.out.println(annotation);
        }

        Field v1 = Test.class.getDeclaredField("v1");
        for (Annotation annotation : v1.getAnnotations()) {
            System.out.println(annotation);
        }
    }
}
